package com.xinsoft.entity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xinsoft.common.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 销售订单
 * @TableName scm_sale
 */
@TableName(value ="scm_sale")
@Data
public class ScmSale extends BaseEntity implements Serializable {

    /**
     * 客户id
     */
    @TableField(value = "client_id")
    private Integer clientId;

    /**
     * 收货地址
     */
    @TableField(value = "client_address")
    private String clientAddress;

    /**
     * 销售员
     */
    @TableField(value = "sales_person_id")
    private Integer salesPersonId;

    /**
     * 联系人名称
     */
    @TableField(value = "linkman_name")
    private String linkmanName;

    /**
     * 联系人电话
     */
    @TableField(value = "linkman_phone")
    private String linkmanPhone;

    /**
     * 合同编号
     */
    @TableField(value = "contract_code")
    private String contractCode;

    /**
     * 合同类型
     */
    @TableField(value = "contract_type")
    private Integer contractType;

    /**
     * 合同日期
     */
    @TableField(value = "contract_date")
    private Date contractDate;

    /**
     * 合同有效期
     */
    @TableField(value = "contract_expire_date")
    private Date contractExpireDate;

    /**
     * 减免金额
     */
    @TableField(value = "discount_rate")
    private BigDecimal discountRate;

    /**
     * 优惠折扣率
     */
    @TableField(value = "discount_amount")
    private BigDecimal discountAmount;

    /**
     * 订单总额
     */
    @TableField(value = "pay_amount")
    private BigDecimal payAmount;

    /**
     * 审核状态
     */
    @TableField(value = "audit_sign")
    private Integer auditSign;

    /**
     * 开票总额
     */
    @TableField(value = "invoiced_amount")
    private BigDecimal invoicedAmount;

    /**
     * 关闭状态(0未关闭/1关闭)
     */
    @TableField(value = "do_close")
    private Integer doClose;

    /**
     * 项目Id
     */
    @TableField(value = "project_id")
    private Integer projectId;

    /**
     * 备注
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 审批状态 默认0暂存, 1:已提交(审批中), 2:驳回, 3:审批通过
     */
    @TableField(value = "approve_status")
    private Integer approveStatus;

    /**
     * 申请人ID
     */
    @TableField(value = "apply_person_id")
    private Integer applyPersonId;

    /**
     * 申请时间
     */
    @TableField(value = "apply_time")
    private Date applyTime;

    /**
     * 付款类型id
     */
    @TableField(value = "pay_type")
    private Integer payType;

    /**
     * 单据状态1.生产中2.已入库3.已发货4.已收货
     */
    @TableField(value = "contract_status")
    private Integer contractStatus;


}